const { BrowserWindow } = require('electron');
const path = require('path');

let win;
function create() {
    win = new BrowserWindow({// 创建一个窗口
        width: 600,
        height: 600,
        webPreferences: {// 可以使用node相关的
            nodeIntegration: true,
            enableRemoteModule: true
        }
    });
    win.loadFile(path.resolve(__dirname, '../template/media-stream.html'));


}
function send(channel, ...args) {//接收信息
    wini.webContents.send(channel, ...args);
}
module.exports = {create, send };